<template>
  <div class="goods clear-fix">
    <div class="info-header" v-if="isShow">
        <div class="header-title">用户推荐</div>
        <div class="header-more">
          更多&nbsp;&gt;
          <i class="arrow-right" />
        </div>
    </div>
    <goods-list
      v-for="(item,index) in goods"
      :key="index"
      :goodsItemList="item"
    ></goods-list>
  </div>
</template>

<script>
import GoodsList from "./goodsList.vue";
export default {
  name: "goods",
  components: {
    GoodsList,
  },
  props: {
    goods: {
      type: Array,
      default() {
        return [];
      },
    },
  },
  data() {
    return {};
  },
  watch: {},
  computed: {
    isShow(){
      return this.$route.path.indexOf('/detail') !== -1
    }
  },
  methods: {},
  created() {},
  mounted() {},
};
</script>
<style lang="less" scoped>
.info-header {
  line-height: 50px;
  height: 50px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 5px 12px;
}

.header-title {
  font-size: 15px;
  float: left;
}

.header-more {
  font-size: 13px;
  float: right;
  margin-right: 10px;
}
</style>